<template>
  <div class="my_div">
    <img :src="imgu" />
    <p @click="btn">{{ name1}}</p>
  </div>
</template>

<script>
export default {
  name: "xuan",
  props: ["imgu", "name1"],
  methods: {
    btn() {
      this.$emit("love", this.name1);
    },
  },
};
</script>

<style >
.my_div {
  width: 400px;
  border: 1px solid black;
  text-align: center;
  float: left;
}

.my_div img {
  width: 100%;
}
</style>